# $Id$
# Maintainer: Dan McGee <dan@archlinux.org>

pkgname=libarchive
pkgver=3.3.2
pkgrel=1
pkgdesc="library that can create and read several streaming archive formats"
arch=('i686' 'x86_64')
url="http://libarchive.org/"
license=('BSD')
depends=('acl' 'attr' 'bzip2' 'expat' 'lz4' 'openssl' 'xz' 'zlib')
options=('strip' 'debug' '!libtool')
provides=('libarchive.so')
source=("$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('22560b89d420b11a4a724877bc6672b7d7c0f239e77d42a39dcc5a9c3b28db82')

build() {
  cd "$pkgname-$pkgver"

  autoreconf -fi
  ./configure \
      --prefix=/usr \
      --without-xml2 \
      --without-nettle \
      --disable-static

  make
}

check() {
  cd "$pkgname-$pkgver"

  # bsdcpio_test fails
  #make check
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
  install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING
}
